package object;

public class Human {
    private String name;//姓名
    private int age;
    private double salary;

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
    /*
    *做饭
    * @parm name 食物的名称
    * @return 食物
     */
    public Food cooking(String name){
        return new Food(name);
    }
    /*
    *吃饭
    *@parm food 食物
     */
    public String eat(Food food){
        String str=food.sub();
        return name+ ","+str;
    }
}
